{extend name="layout:default" /}
{block name="title"}修改{/block}
{block name="content"}
<div class="box box-default">
    <div class="box-header with-border">
        <h3 class="box-title">编辑管理员</h3>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <form class="form-horizontal" method="post" enctype="multipart/form-data">
            <input type="hidden" name="id" value="{$admin.id}">
            <div class="form-group">
                <label class="col-sm-2 control-label">管理员昵称</label>
                <div class="col-sm-10">
                    <input type="text" value="{$admin.nickname}" class="form-control" name="nickname"
                           placeholder="Nickname">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">邮箱</label>
                <div class="col-sm-10">
                    <input type="email" value="{$admin.email}" class="form-control" name="email" placeholder="Email">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">密码</label>
                <div class="col-sm-10">
                    <input type="password" class="form-control" name="password"
                           placeholder="Password">
                </div>
            </div>
            {if condition="$admin.id neq 1"}
            <div class="form-group">
                <label class="col-sm-2 control-label">角色名称</label>
                <div class="col-sm-10">
                    {volist name="groups" id="vo"}
                    <label class="checkbox-inline">
                        <input type="checkbox" name="groupId[]"
                               value="{$vo.id}" <?php if(strpos($auth,(string)$vo->id)!==false){echo 'checked';}?>
                        >{$vo.title}
                    </label>
                    {/volist}
                </div>
            </div>
            {else /}
            {/if}
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-info pull-right">提交</button>
                </div>
            </div>
        </form>
    </div>
    <!-- /.box-body -->
</div>
{/block}